<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>

        .box1{
            width: 100px;
            height: 100px;
            background-color: red;
            position: fixed;
            right: 100px;
            bottom: 100px;
        }

        .box2{
            width: 400px;
            height: 400px;
            background-color: blueviolet;
        }

        .box3{
            width: 200px;
            height: 200px;
            background-color: blue;
            position: absolute;
            left: 0;
            top: 0;
        }

        h3{
            height: 500px;
        }
        h2{
            color: red;
        }

    </style>
</head>
<body>
    
    <div class="box1"></div>
    <div class="box2"></div>
    <div class="box3"></div>
    
    <h2>温馨提示</h2>
    <p>设置定位之后，相对定位和绝对定位他是相对于具有定位的父级元素进行位置调整，
        如果父级元素不存在定位，则继续向上逐级寻找，直到顶层文档
    </p>
    
    <h3>哈哈</h3>
    <h3>哈哈</h3>
    <h3>哈哈</h3>
    <h3>哈哈</h3>
    <h3>哈哈</h3>
    <h3>哈哈</h3>

</body>
</html>